<div class="form full">

	<?php
	$form = $this->beginWidget('CActiveForm',
		array(
		'id'=>'family-form',
		'enableAjaxValidation'=>true,
		));
	?>

	<p class="note">
		Fields with <span class="required">*</span> are required.
	</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'employeeId');
		$criteria = array(
			'order'=>'name',
		);
		$models = Employee::model()->findAll($criteria);
		$data = CHtml::listData($models, 'id', 'name');
		$htmlOptions = array(
			'empty'=>''
		);
		echo $form->dropDownList($model, 'employeeId', $data, $htmlOptions);
		echo $form->error($model, 'employeeId');
		?>
	</div>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'name');
		$htmlOptions = array('size'=>60, 'maxlength'=>128);
		echo $form->textField($model, 'name', $htmlOptions);
		echo $form->error($model, 'name');
		?>
	</div>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'gender');
		echo $form->dropDownList(
			$model, 'gender', $model->genderBehavior->list
		);
		echo $form->error($model, 'gender');
		?>
	</div>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'relation');
		$data = array(
			Family::RELATION_CHILD=>Family::RELATION_CHILD,
			Family::RELATION_SPOUSE=>Family::RELATION_SPOUSE,
		);
		echo $form->dropDownList($model, 'relation', $data);
		echo $form->error($model, 'relation');
		?>
	</div>

	<div class="row buttons">
		<?php
		echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
		?>
	</div>

	<?php $this->endWidget(); ?>

</div><!-- form -->